﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<DVSProject.Models.LocationMachineSetModels>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Location Machine Set
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Location Machine Set</h2>
    <p>
        <%= Html.ActionLink("Create New", "Create") %>
    </p>
    <div class="CSSTableGenerator">
    <table>
        <tr>
            <th></th>
             <th></th>
            <th>
                Code No
            </th>
            <th>
                Location
            </th>
             <th>
                 Machine
            </th>
           <%--  <th>
                Start Meter
            </th>--%>
            <th>
               Last Meter
            </th>
            <th>
                Total Meter Value 
            </th>
             <th>
               Contract Start Date
            </th>
        <th>
                Remark
            </th>
        </tr>

    <% foreach (var item in Model) { %>
    
        <tr>
            <td>
                <%= Html.ActionLink("เปลี่ยนเครื่อง", "Edit", new {id= item .code_no /* id=item.PrimaryKey */ }) %>
            </td>
           <td>
                <%= Html.ActionLink("แก้ไข", "EditLms", new { id = item.code_no /* id=item.PrimaryKey */ })%>
            </td>
            <td>
                <%= Html.Encode(item.code_no) %>
            </td>
            <td>
                <%= Html.Encode(item.LocSet_Name) %>
            </td>
            <td>
                <%= Html.Encode(item.Machine_Name) %>
            </td>
           <%--  <td>
                <%= Html.Encode(String.Format("{0:0.##}", item.start_meter_no))%>
            </td>--%>
             <td>
                <%= Html.Encode(String.Format("{0:0.##}", item.last_meter_no))%>
            </td>
            <td>
                <%= Html.Encode(String.Format("{0:0.##}", item.total_meter_value))%>
            </td>
              <td>
                  <%= Html.Encode(String.Format("{0:d}", item.contract_start_date)) %>
            </td>
            <td>
                <%= Html.Encode(item.remark) %>
            </td>
        </tr>
    
    <% } %>

    </table></div>

    

</asp:Content>

